﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;

public class Restart : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        Button restartButton = gameObject.GetComponent<Button>();
        restartButton.onClick.AddListener(RestartGame);
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    public void RestartGame()
    {
        //8、重新游戏
        SceneManager.LoadScene("WhacAMole");
    }
}
